<form onsubmit="hook()" id="login_form">
    User: <input type="text" name="user" id="user_text" /><br/>
    Password: <input type="password" name="password" id="pass_text"/><br/>
    <input type="submit" value="Login" />
</form>

<script type="text/javascript" src="jquery.js"></script>
<script>

function hook()
{
    chrome.extension.sendRequest({action : 'auth',
            user: $('#user_text').value, password: $('#pass_text').value },
        function(response) {
        alert(response);
    });
}

</script>
